package com.example.entity;

import java.util.ArrayList;
import java.util.List;

/*
 *评论表
 * */
public class Comment {
    private Integer id;
    private Integer userId;
    private String content;
    private String time;
    private Integer writtenId;
    private Integer parentId;

    // 关联字段（非数据库字段）
    private String userAvatar;
    private String userName;
    private List<Comment> children = new ArrayList<>();

    // getters/setters

    public List<Comment> getChildren() {
        return children;
    }

    public void setChildren(List<Comment> children) {
        this.children = children;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public String getTime() {
        return time;
    }

    public void setTime(String time) {
        this.time = time;
    }

    public Integer getWrittenId() {
        return writtenId;
    }

    public void setWrittenId(Integer writtenId) {
        this.writtenId = writtenId;
    }

    public Integer getParentId() {
        return parentId;
    }

    public void setParentId(Integer parentId) {
        this.parentId = parentId;
    }

    public String getUserAvatar() {
        return userAvatar;
    }

    public void setUserAvatar(String userAvatar) {
        this.userAvatar = userAvatar;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }
}


